<?php echo $header; ?>
<div class="mef_mainbody">
<div class="mef_container">
<div class="mef_leftbody">
<div class="newsworthy_wp">
<div class="vertical_menu">
<?php echo $column_left; ?>
</div>
<?php if ($thumb || $description) { ?>
<div class="category-info">
<?php if ($thumb) { ?>
<div class="image"><img src="<?php echo $thumb; ?>" alt="<?php echo $heading_title; ?>" /></div>
<?php } ?>
<?php if ($description) { ?>
<?php echo $description; ?>
<?php } ?>
</div>
<?php } ?>
<?php if ($categories) { ?>
<h2><?php echo $text_refine; ?></h2>
<div class="category-list">
<?php if (count($categories) <= 5) { ?>
<ul>
<?php foreach ($categories as $category) { ?>
<li><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a></li>
<?php } ?>
</ul>
<?php } else { ?>
<?php for ($i = 0; $i < count($categories);) { ?>
<ul>
<?php $j = $i + ceil(count($categories) / 4); ?>
<?php for (; $i < $j; $i++) { ?>
<?php if (isset($categories[$i])) { ?>
<li><a href="<?php echo $categories[$i]['href']; ?>"><?php echo $categories[$i]['name']; ?></a></li>
<?php } ?>
<?php } ?>
</ul>
<?php } ?>
<?php } ?>
</div>
<?php } ?>
<?php if ($products) { ?>
<div class="leftpart product_panel">
<h2 class="darkblue"><?php echo $heading_title; ?></h2>
<?php foreach ($products as $product) { ?>
<?php if ($product['thumb']) { ?>
<div class="dynamicpart"><a href="<?php echo $product['href']; ?>"><img class="mef_fimg" src="<?php echo $product['thumb']; ?>" title="<?php echo $product['name']; ?>" alt="<?php echo $product['name']; ?>" /></a>
<?php } ?>
<div>
<h3><?php echo $product['name']; ?></h3>

<?php if ($product['price']) { ?>
<?php if (!$product['special']) { ?>
<span class="WebRupee"><?php echo $product['price']; ?></span>
<?php } else { ?>
<span>
<?php echo $product['price']; ?>
<?php echo $product['special']; ?>
</span>
<br/>
<br/>
<?php } ?>
<?php } ?>
<p><?php echo $product['description']; ?></p>
<p style="padding-top:10px;">
<a onclick="addToCart('<?php echo $product['product_id']; ?>');" class="addcartbtn"><img src="image/data/demo/addcart.png" style="vertical-align:top; padding-right:5px; padding-top:3px;"/><?php echo $button_cart; ?></a>
<!--<input type="button" value="<?php echo $button_cart; ?>" onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button color" />-->
<a href="<?php echo $product['href']; ?>" class="buythisnow"><img src="image/data/demo/buythisnow_img.png" style="vertical-align:top; padding-right:5px;"/>Buy Now</a>
</p>
</div>
</div>
<?php } ?>
</div>
<?php } ?>
</div>
</div>
<div class="mef_rightbody">
<div class="newspanel">
<h2>News</h2>
<p>
We only want to share your true experiences.
If you have joined our family.
</p>
<p>
We are a family corporation who believes in simplicity.
After reviewing
</p>
<p>
please submit them by filling the form below.
Look out for our response on this page.
</p>
</div>
<div class="newspanel newspaneltwo">
<h2>Popular</h2>
<p>
We only want to share your true experiences.
If you have joined our family.
</p>
<p>
We are a family corporation who believes in simplicity.
After reviewing
</p>
<p>
please submit them by filling the form below.
Look out for our response on this page.
</p>


</div>


<div class="newspanel newspaneltwo">

<h2>Get dispatches</h2>

<p>
We only want to share your true experiences.
If you have joined our family.
</p>

<p>
We are a family corporation who believes in simplicity.
After reviewing
</p>
<p>
please submit them by filling the form below.
Look out for our response on this page.
</p>


</div>

</div>

</div>

<script type="text/javascript"><!--
function display(view) {
if (view == 'list') {
$('.product-grid').attr('class', 'product-list');

$('.product-list > div').each(function(index, element) {
html  = '<div class="right">';
html += '  <div class="cart">' + $(element).find('.cart').html() + '</div>';
html += '  <div class="wishlist">' + $(element).find('.wishlist').html() + '</div>';
html += '  <div class="compare">' + $(element).find('.compare').html() + '</div>';
html += '</div>';			

html += '<div class="left">';

var image = $(element).find('.image').html();

if (image != null) { 
html += '<div class="image">' + image + '</div>';
}

var price = $(element).find('.price').html();

if (price != null) {
html += '<div class="price">' + price  + '</div>';
}

html += '  <div class="name">' + $(element).find('.name').html() + '</div>';
html += '  <div class="description">' + $(element).find('.description').html() + '</div>';

var rating = $(element).find('.rating').html();

if (rating != null) {
html += '<div class="rating">' + rating + '</div>';
}

html += '</div>';

$(element).html(html);
});		

$('.display').html('<b><?php echo $text_display; ?></b> <?php echo $text_list; ?> <b>/</b> <a onclick="display(\'grid\');"><?php echo $text_grid; ?></a>');

$.totalStorage('display', 'list'); 
} else {
$('.product-list').attr('class', 'product-grid');

$('.product-grid > div').each(function(index, element) {
html = '';

var image = $(element).find('.image').html();

if (image != null) {
html += '<div class="image">' + image + '</div>';
}

html += '<div class="name">' + $(element).find('.name').html() + '</div>';
html += '<div class="description">' + $(element).find('.description').html() + '</div>';

var price = $(element).find('.price').html();

if (price != null) {
html += '<div class="price">' + price  + '</div>';
}

var rating = $(element).find('.rating').html();

if (rating != null) {
html += '<div class="rating">' + rating + '</div>';
}

html += '<div class="cart">' + $(element).find('.cart').html() + '</div>';
html += '<div class="wishlist">' + $(element).find('.wishlist').html() + '</div>';
html += '<div class="compare">' + $(element).find('.compare').html() + '</div>';

$(element).html(html);
});	

$('.display').html('<b><?php echo $text_display; ?></b> <a onclick="display(\'list\');"><?php echo $text_list; ?></a> <b>/</b> <?php echo $text_grid; ?>');

$.totalStorage('display', 'grid');
}
}

view = $.totalStorage('display');

if (view) {
display(view);
} else {
display('list');
}
//--></script> 
<?php echo $footer; ?>